﻿<Page
    x:Class="Lego.Ev3.Tester.WinRT.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Lego.Ev3.Tester.WinRT"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

	<StackPanel Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
		<StackPanel Orientation="Horizontal">
			<Button Click="Connect_Click">Connect</Button>
			<Button Click="Disconnect_Click">Disconnect</Button>
		</StackPanel>
		<StackPanel Orientation="Horizontal">
			<StackPanel Width="300">
				<Button x:Name="PlayTone" Click="PlayTone_Click">Play Tone</Button>
				<Button x:Name="GetFirmwareVersion" Click="GetFirmwareVersion_Click">Get FW Version</Button>
				<Button x:Name="TurnMotorPower" Click="TurnMotorPower_Click">Turn Motor at Power</Button>
				<Button x:Name="TurnMotorSpeed" Click="TurnMotorSpeed_Click">Turn Motor at Speed</Button>
				<Button x:Name="StepMotorPower" Click="StepMotorPower_Click">Step Motor at Power</Button>
				<Button x:Name="StepMotorSpeed" Click="StepMotorSpeed_Click">Step Motor at Speed</Button>
				<Button x:Name="TimeMotorPower" Click="TimeMotorPower_Click">Time Motor at Power</Button>
				<Button x:Name="TimeMotorSpeed" Click="TimeMotorSpeed_Click">Time Motor at Speed</Button>
				<Button x:Name="StopMotor" Click="StopMotor_Click">Stop Motor</Button>
				<Button x:Name="SetLed" Click="SetLed_Click">Set LED</Button>
				<Button x:Name="PlaySound" Click="PlaySound_Click">Upload and Play Sound</Button>
				<Button x:Name="Draw" Click="Draw_Click">Draw on LCD</Button>
				<Button x:Name="BatchNoReply" Click="BatchNoReply_Click">Batch with No Reply</Button>
				<Button x:Name="BatchReply" Click="BatchReply_Click">Batch with Reply</Button>
			</StackPanel>
			<StackPanel Width="700">
				<TextBox x:Name="Output"/>
				<ListBox x:Name="InputPorts" ItemsSource="{Binding}" Height="336">
					<ListBox.ItemTemplate>
						<DataTemplate>
							<StackPanel Orientation="Horizontal">
							<TextBlock>
								<Run Text="Index: "/><Run Text="{Binding Key}"/>
								<Run Text=", Type: "/><Run Text="{Binding Value.Type}"/>
								<Run Text=", Mode: "/><Run Text="{Binding Value.Mode}"/>
								<Run Text=", SI Value: "/><Run Text="{Binding Value.SIValue}"/>
								<Run Text=", Raw Value: "/><Run Text="{Binding Value.RawValue}"/>
								<Run Text=", Pct Value: "/><Run Text="{Binding Value.PercentValue}"/>
							</TextBlock>
						</StackPanel>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>
				<TextBlock x:Name="Buttons">
					<Run Text="Up: "/><Run Text="{Binding Up}"/><LineBreak/>
					<Run Text="Down: "/><Run Text="{Binding Down}"/><LineBreak/>
					<Run Text="Left: "/><Run Text="{Binding Left}"/><LineBreak/>
					<Run Text="Right: "/><Run Text="{Binding Right}"/><LineBreak/>
					<Run Text="Back: "/><Run Text="{Binding Back}"/><LineBreak/>
					<Run Text="Enter: "/><Run Text="{Binding Enter}"/><LineBreak/>
				</TextBlock>
			</StackPanel>
		</StackPanel>
	</StackPanel>
</Page>
